<template>
	<view class="content">
		<view class="WithdrawalBody">
			<text class="WithdrawalText">提现金额（元）</text>
			<view class="WithdrawalFlex">
				<text class="moneny">￥</text>
				<input type="text" />
				<u--image :showLoading="true" src="../../static/more.png" width="28rpx" height="28rpx"
					radius="0"></u--image>
			</view>
			<text class="WithdrawalText marginTop">提现至</text>
			<view class="RadioFlex">
				<radio-group @change="radioChange">
					<label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in items" :key="item.value">
						<view class="WithdrawalView">
							<u--image :showLoading="true" :src="item.icon" width="48rpx" height="48rpx"
								radius="0"></u--image>
							<text>{{item.name}}</text>
						</view>
						<radio :value="item.value" :checked="index === current" style="transform: scale(0.8);"/>
					</label>
				</radio-group>
			</view>
		</view>
		<button @click="linkUrl('/pages/Mine/Withdrawal/Withdrawal_result')">申请提现</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				items: [{
					icon:'../../static/Mine/wx.png',
						value: 'USA',
						name: '微信',
						checked: false
					},
					{
						icon:'../../static/Mine/zfb.png',
						value: 'USA',
						name: '支付宝',
						checked: false
					}],
				current: 0
			}
		},
		methods: {
			radioChange: function(evt) {
				for (let i = 0; i < this.items.length; i++) {
					if (this.items[i].value === evt.detail.value) {
						this.current = i;
						break;
					}
				}
			},
			linkUrl(e){
				uni.navigateTo({
					url:e
				});
			}
		}
	}
</script>

<style>
	page {
		background-color: #f7f7f7;
	}
</style>
<style scoped lang="scss">
	.content {
		.WithdrawalBody {
			width: 85%;
			padding: 30rpx;
			border-radius: 20rpx;
			background-color: #fff;
			margin: 0px auto;
			margin-top: 20rpx;
			padding-bottom:40rpx;

			.WithdrawalText {
				display: block;
				font-family: PingFangSC, PingFang SC;
				font-weight: 500;
				font-size: 28rpx;
				color: #202020;
			}

			.marginTop {
				margin-top: 35rpx;
			}

			.WithdrawalFlex {
				display: flex;
				justify-content: space-between;
				align-items: center;
				margin-top: 50rpx;
				border-bottom: 2rpx solid #F2F2F2;
				padding-bottom: 10rpx;

				.moneny {
					font-family: PingFangSC, PingFang SC;
					font-weight: 500;
					font-size: 40rpx;
					color: #202020;
				}

				input {
					width: 90%;
					padding-left: 10rpx;
					// border:1px solid #fff;
					border: none;
				}
			}
		}
		.RadioFlex{
			.uni-list-cell{
				display: flex;
				justify-content: space-between;
				align-items: center;
				margin-top:40rpx;
				.WithdrawalView{
					display: flex;
					align-items: center;
					text{
						font-family: PingFangSC, PingFang SC;
						font-weight: 400;
						font-size: 28rpx;
						color: #101010;
						margin-left:20rpx;
					}
				}
			}
		}
		button{
			width:90%;
			height:86rpx;
			margin:0px;
			background: linear-gradient( 270deg, #3078FF 0%, #009DFE 100%);
			border-radius:50rpx;
			font-family: PingFangSC, PingFang SC;
			font-weight: 500;
			font-size: 32rpx;
			color: #FFFFFF;
			display: flex;
			justify-content: center;
			align-items: center;
			position: fixed;
			bottom:40rpx;
			left:5%;
		}
	}
</style>